Skip to content

increase OpenFlow connection timeouts and make them configurable#488

Merged
rubensfig merged 2 commits into
mainfrom
jogo_timeouts
May 27, 2026
Merged

increase OpenFlow connection timeouts and make them configurable#488
rubensfig merged 2 commits into
mainfrom
jogo_timeouts

Conversation

@KanjiMonster

Copy link
Copy Markdown
Contributor

OpenFlow says:

"OpenFlow messages are processed out of order (see 6.2), and the processing of some requests by the switch may take a long time, therefore a controller must never terminate a connection because a request is taking too much time. An exception to that rule is for echo replies, a controller or a switch may terminate a connection if the reply for an echo request it sent takes too much time, however there must be a way to disable that feature and the timeout should be large enough to accommodate a wide variety of conditions."

A maximum of 4 seconds (1 lifetime + 3 echo) is not much if the OpenFlow connection is conguested due to a large amount of messages to process, so double the echo timout.

Since rofl-common also sends out echo requests on long-standing barrier requests, but barrier-requests inhibit processing messages until completed, also increase the lifetime check significantly to allow barrier_requests to take up to 16 seconds, not 4.

This should significantly increase the stability of the OpenFlow connection under stress conditions.

In case the chosen limits are insufficient or cause issues otherwise, make the values configurable.

OpenFlow says:

"OpenFlow messages are processed out of order (see 6.2), and the
processing of some requests by the switch may take a long time,
therefore a controller must never terminate a connection because a
request is taking too much time. An exception to that rule is for echo
replies, a controller or a switch may terminate a connection if the
reply for an echo request it sent takes too much time, however there
must be a way to disable that feature and the timeout should be large
enough to accommodate a wide variety of conditions."

A maximum of 4 seconds (1 lifetime + 3 echo) is not much if the OpenFlow
connection is conguested due to a large amount of messages to process,
so double the echo timout.

Since rofl-common also sends out echo requests on long-standing barrier
requests, but barrier-requests inhibit processing messages until
completed, also increase the lifetime check significantly to allow
barrier_requests to take up to 16 seconds, not 4.

This should significantly increase the stability of the OpenFlow
connection under stress conditions.

Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
@KanjiMonster KanjiMonster requested review from b3n-l and rubensfig May 8, 2026 11:48
Allow configuring two OpenFlow connection timeouts:

* of_timeout_echo: timeout of sent echo requests
* of_timeout_lifecheck: delay of sending echo requests if rx is idle

This allows overriding the defaults in case the selected values are too
tight.

Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
@KanjiMonster

Copy link
Copy Markdown
Contributor Author

Dropped the reference to the not existing of_txqueue_max_size variable.

@rubensfig rubensfig merged commit e0c0a6a into main May 27, 2026
4 checks passed
@rubensfig rubensfig deleted the jogo_timeouts branch May 27, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants